﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="ApprovePurchaseOrder.aspx.cs" Inherits="PresentationLayer.ApprovePurchaseOrder" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="MyScripts/approvePurchaseOrder.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <div align="center">
            <h1>Stationery Purchase Order for Approval</h1>
            <br />
            <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label>
            <table width="25%">
                <tr align="left">
                    <td>
                        <asp:Label ID="lblSupplierNameLabel" runat="server" Text="Supplier Name"></asp:Label></td>
                    <td>
                        <asp:Label ID="lblSupplierName" runat="server"></asp:Label></td>
                </tr>
                <tr align="left">
                    <td>
                        <asp:Label ID="lblAttnLabel" runat="server" Text="Attn"></asp:Label></td>
                    <td>
                        <asp:Label ID="lblAttn" runat="server"></asp:Label></td>
                </tr>
                <tr align="left">
                    <td>
                        <asp:Label ID="lblExpectedDateLabel" runat="server" Text="Expected Delivery Date"></asp:Label></td>
                    <td>
                        <asp:Label ID="lblExpectedDate" runat="server"></asp:Label></td>
                </tr>
            </table>
            <br />
            <asp:GridView ID="gvPurchaseOrder" runat="server" AutoGenerateColumns="False" CssClass="table table-hover table-striped table-bordered" Width="60%">
                <Columns>
                    <asp:TemplateField HeaderText="PO Detail ID" Visible="false">
                        <ItemTemplate>
                            <asp:Label ID="lblPODetailIdGV" runat="server" Text='<%# Eval("PODetailId") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Item Code" Visible="false">
                        <ItemTemplate>
                            <asp:Label ID="lblItemCodeGV" runat="server" Text='<%# Eval("ItemCode") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Item Name">
                        <ItemTemplate>
                            <asp:Label ID="lblItemNameGV" runat="server" Text='<%# Eval("ItemName") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Unit of Measurement">
                        <ItemTemplate>
                            <asp:Label ID="lblUOMGV" runat="server" Text='<%# Eval("UnitOfMeasurement") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Quantity">
                        <ItemTemplate>
                            <asp:Label ID="lblQuantityGV" runat="server" Text='<%# Eval("Quantity") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Unit Price (S$)">
                        <ItemTemplate>
                            <asp:Label ID="lblUnitPriceGV" runat="server" Text='<%# Eval("UnitPrice") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Amount (S$)">
                        <ItemTemplate>
                            <asp:Label ID="lblAmountGV" runat="server" Text='<%# Eval("Amount") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    </Columns>
            </asp:GridView>
            <br />
            <asp:Label ID="lblTotal" runat="server"></asp:Label>
            <br />
            <br />
            <asp:Label ID="lblReason" runat="server" Text="Reason"></asp:Label>
            <div align="center">
                <asp:TextBox ID="txtReason" runat="server" TextMode="MultiLine" CssClass="form-control" Width="50%"></asp:TextBox>
            </div>
            <br />
            <asp:Button ID="btnApprove" runat="server" Text="Approve" OnClick="btnApprove_Click" OnClientClick="disableReject()" CssClass="btn-primary" />
            <asp:Button ID="btnReject" runat="server" Text="Reject" OnClick="btnReject_Click" OnClientClick="disableApprove()" CssClass="btn-success" />
            <br />
            <br />
            <asp:Button ID="btnReturnToList" runat="server" Text="Return To Purchase Order List for Approval" OnClick="btnReturnToList_Click" CssClass="btn" />
            <br />
            <br />
        </div>
</asp:Content>
